<template>
  <view>
    <view class="public">
      <view>{{ props.title }}</view>
	  <view :style="{textAlign:type=='center'?'center':'',marginBottom:type=='center'?'20rpx':''}">{{ props.text }}</view>
      <view>
        <text @click="close()">取消</text>
        <text @click="submit()">确定</text>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
const props = defineProps({
  title: String,
  text:String,
  type:String,
});
const emits = defineEmits(['close', 'submit']);
function close() {
  emits('close');
}
function submit() {
  emits('submit');
}
</script>

<style scoped lang="less">
.public {
  width: 680rpx;
  background: #ffffff;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  view:nth-of-type(1) {
    font-size: 34rpx;
    font-family: PingFang SC;
    font-weight: 400;
    color: #333333;
    width: 100%;
    text-align: center;
    padding:20rpx 0px 40rpx;
    box-sizing: border-box;
    border-bottom: 1px solid #eee;
  }
   view:nth-of-type(2){
	   width: 100%;
	   padding: 30rpx 20rpx;
	   box-sizing: border-box;
	   font-size: 32rpx;
	   font-family: PingFang SC;
	   font-weight: 400;
	   color: #333333;
   }
  view:nth-of-type(3) {
    width: 100%;
	padding:0px 20rpx 40rpx;
	box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-around;
    text {
      width: 275rpx;
      height: 80rpx;
      font-size: 36rpx;
      font-family: PingFang SC;
      font-weight: 400;
      text-align: center;
      line-height: 80rpx;
    }
    text:nth-of-type(1) {
      border: 1px solid #1b91ff;
      border-radius: 5px;
      color: #1b91ff;
    }
    text:nth-of-type(2) {
      background: linear-gradient(104deg, #41a3ff, #1b91ff);
      border-radius: 5px;
      color: #ffffff;
    }
  }
}
</style>
